﻿@section header
{
    <link href="~/Themes/RongJi/Style/base/css/account.css" rel="stylesheet">
}
@section title
{
订单详情
}
<div id="equalize">
    @{
        Html.RenderPartial("MenuPartial");
    }
    <div class="col-right">
        <div class="wrapper-right">
            <header class="accountHeader">
                <i class="zhang"></i>
                <h2>订单详情</h2>
            </header>
            <div class="section">
                <table class="orderDetails">
                    <thead>
                        <tr>
                            <th class="ttt">订单编号：</th>
                            <td>@Model.OrderNumber</td>
                            <th class="ttt">当前状态：</th>
                            <td>@Model.OrdeStatusName</td>
                        </tr>
                        <tr>
                            <th class="ttt">订单类型：</th>
                            <td>
                                @Model.DisplayOrderType
                              @*  @if (@Model.OrderType == 0)
                                {
                                    @Html.Raw("普通订单")
                                }
                                else if (@Model.OrderType == 1)
                                {
                                    @Html.Raw("VF从供应商采购到本地WH发货订单")
                                }
                                else if (@Model.OrderType == 2)
                                {
                                    @Html.Raw("VF直接从供应商发货订单")
                                }
                                else if (@Model.OrderType == 3)
                                {
                                    @Html.Raw("RMA产生换货订单")
                                }
                                else if (@Model.OrderType == 4)
                                {
                                    @Html.Raw("RMA产生原物返回订单")
                                }
                                else if (@Model.OrderType == 5)
                                {
                                    @Html.Raw("在线支付产生的订单")
                                }
                                else if (@Model.OrderType == 6)
                                {
                                    @Html.Raw("送礼订单")
                                }*@
                            </td>
                            <th class="ttt">下单时间：</th>
                            <td>@Model.OrderDate</td>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <th class="ttt">订单总额：</th>
                            <td>￥@Model.OrderPayAmount</td>
                            <th class="ttt">配送时间：</th>
                            <td>
                                        @if (@Model.ReceiveType == 0)
                                        {
                                            @Html.Raw("工作日送货（包括双休日、假日送）")
                                        }
                                        else if (@Model.ReceiveType == 1)
                                        {
                                            @Html.Raw("只工作日送货（双休日、假日不用送）")
                                        }
                                        else if (@Model.ReceiveType == 2)
                                        {
                                            @Html.Raw("只双休日、假日送")
                                        }</td>
                        </tr>
                        <tr>
                            <th class="ttt">收货信息：</th>
                            <td>
                                <p>
                                    <label>
                                        收货人：
                                    </label>
                                    <span>@Model.CustomerUserName</span>
                                </p>
                                <p>
                                    <label>
                                        手机：
                                    </label>
                                    <span>@Model.ReceiveCellPhone</span>
                                </p>
                                <p>
                                    <label>
                                        联系电话：
                                    </label>
                                    <span>@Model.ReceivePhone</span>
                                </p>
                                <p>
                                    <label>
                                        所在地区：
                                    </label>
                                    <span>@Model.FullRegionName </span>
                                </p>
                                <p>
                                    <label>
                                        联系地址：
                                    </label>
                                    <span>@Model.ReceiveAddress </span>
                                </p>
                                 @* <p>
                                    <label>
                                        邮编：
                                    </label>
                                    <span>@Model.ZipCode</span>
                                </p>*@
                            </td>
                            <th class="ttt">配送方式：</th>
                            <td>
                                <p>
                                    配送方式：@Model.ShippingModeName
                                </p>
                                <p>
                                    运单号码：@Model.ShipOrderNumber
                                </p>
                                <p>
                                    <label>
                                        运费：@Model.ShippingCharge
                                    </label>
                                </p>
                            </td>
                        </tr>
                        <tr>
                            <th class="ttt">支付方式：</th>
                            <td>@Model.ArrivePayName</td>
                            <th class="ttt">发票信息：</th>
                            <td>
                                <p>
                                    <label>是否开发票：</label>
                                    <span>
                                        @if (@Model.IsInvoice == 1)
                                        {
                                            @Html.Raw("是")
                                        }
                                        else
                                        {
                                            @Html.Raw("否")
                                        }
                                    </span>
                                </p>
                                @if (@Model.IsInvoice == 1)
                                {
                                    <p>
                                        <label>
                                            发票抬头：
                                        </label>
                                        @Model.InvoiceTitle
                                    </p>@*
                                    <p>
                                        <label>
                                            发票内容：
                                        </label>
                                        @Model.InvoiceContent
                                    </p>*@
                                }
                            </td>
                        </tr>
                        <tr>
                            <th class="ttt">用户备注：</th>
                            <td colspan="3">@Model.UserMemo</td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <div id="Tabs">
                                    <ul id="TabsHandler">
                                        <li><a href="#Tabs1"><i class="fa fa-bars"></i> 订单明细</a></li>
                                        <li><a href="#Tabs2"><i class="fa fa-truck"></i> 配送状态</a></li>
                                    </ul>
                                    <div id="Tabs1" class="Tabs-Wrapper">
                                        <table class="proList">
                                            <tbody>
                                                <tr>
                                                    <th>商品编号</th>
                                                    <th style="max-width:300px;">商品名称</th>
                                                    <th>购买价</th>
                                                    <th>优惠</th>
                                                    <th>商品数量</th>
                                                </tr>
                                                @foreach (var item in Model.ProductList)
                                                {
                                                    <tr>
                                                        <td><a href="~/Product/ProductDetail?prd=@item.ProductId" target="_blank">@item.ProductId</a></td>
                                                        <td><a href="~/Product/ProductDetail?prd=@item.ProductId" target="_blank">@item.ProductName</a></td>
                                                        <td>￥@item.UnitPrice</td>
                                                        <td>￥@item.Discount</td>
                                                        <td>@item.Quantity</td>
                                                    </tr>
                                                }
                                            </tbody>
                                        </table>

                                    </div>
                                    <div id="Tabs2" class="Tabs-Wrapper">
                                        <p>
                                            <span class="proDate t">处理时间</span>
                                            <span class="proNote t">订单状态</span>
                                        </p>
                                        @foreach (var orderProcessLog in Model.OrderProcessLogList)
                                        {
                                            <p>
                                                <span class="proDate">@orderProcessLog.InDateFormated</span>
                                                <span class="proNote">@orderProcessLog.ProcessNote</span>
                                            </p>
                                        }
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div class="orderSummary">
                    <p>
                        <label>商品小计：</label><strong>￥@Model.OrderItemTotalCost</strong><br>
                        <label>运费金额：</label><strong>￥@Model.ShippingCharge</strong><br>
                        <label>积分抵扣：</label><strong class="red">- ￥@Model.OrderGiftCardAmount</strong><br>
                        <label>订单折扣：</label><strong>- ￥@Model.DiscountAmount</strong><br>
                        <label>余额抵扣：</label><strong>- ￥@Model.OrderExpenseAmount</strong>
                    </p>
                    <p class="red-total">
                        金额合计：￥ @Model.OrderPayAmount
                    </p>
                </div>
            </div>
        </div>
    </div>
</div>

@section footer
{
    <script src="~/Themes/RongJi/Style/base/js/aTabs.js"></script>
    <script>
        $('#Tabs').aTabs({
            eventName: 'click'
        });
    </script>
}
